﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="Dbz.HomeworkHub.Core.Entities" assembly="Dbz.HomeworkHub.Core">

  <class name="User" table="`User`">

    <id name="UserId">
      <generator class="identity" />
    </id>

    <property name="Password" type="string" />
    <property name="EMail" type="string" />
    <property name="Firstname" type="string" />
    <property name="Lastname" type="string" />
    <property name="CreditPoints" type="int" />
    <property name="DateOfBirth" type="DateTime" />
    <property name="RegistrationDate" type="DateTime" />
    
    
    <bag name="Ranks" table="UserRank" generic="true" inverse="true" cascade="none">
      <key column="UserId" />
      <one-to-many class="Dbz.HomeworkHub.Core.Entities.UserRank" />
    </bag>
    
  </class>

</hibernate-mapping>